﻿Module Module1
    Function Bai09(ByVal n As Integer) As Integer
        Dim T As Integer = 1
        Dim i As Integer
        For i = 1 To n Step 1
            T = T * i
        Next
        Return T
    End Function
    Sub Main()
        Dim n As Integer
        Console.WriteLine("Nhap so n: ")
        n = Console.ReadLine()
        Dim kq As Double
        kq = Bai09(n)
        Console.WriteLine("T(n)= " & kq)
    End Sub

End Module
